package com.youlai.boot.system.converter;

import org.mapstruct.Mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.youlai.boot.system.model.entity.Brand;
import com.youlai.boot.system.model.form.BrandForm;
import com.youlai.boot.system.model.dto.BrandExcelDTO;

import java.util.List;

/**
 * 商品销售品牌数据对象转换器
 *
 * @author xiheforever
 * @since 2025-05-12 23:13
 */
@Mapper(componentModel = "spring")
public interface BrandConverter{

    BrandForm toForm(Brand entity);

    Brand toEntity(BrandForm formData);

    /**
     * 实体转Excel DTO
     */
    BrandExcelDTO entity2ExcelDTO(Brand entity);

    /**
     * 实体列表转Excel DTO列表
     */
    List<BrandExcelDTO> entity2ExcelDTO(List<Brand> entityList);

    /**
     * Excel DTO转实体
     */
    Brand excelDTO2Entity(BrandExcelDTO excelDTO);
}